<style lang="scss" scoped>
#cmain {
    .mainContent {
        min-height: 425px;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0px 0px 15px 0px rgba(207, 207, 207, 1);
        padding-top: 10px;
        padding: 0px 30px;
        .table-title {
            height: 54px;
            line-height: 54px;
            margin-bottom: 20px;
            font-size: 16px;
            font-weight: 800;
            color: rgba(102, 102, 102, 1);
            border-bottom: 1px solid #dcdfe6;
        }
        .el-input--mini .el-input__inner {
            width: 202px;
        }
        .smok-drink .el-input__inner {
            width: 100%;
        }
        #my-table-title {
            height: 50px;
            line-height: 50px;
            text-align: center;
            background: #eef1f6;
            font-size: 14px;
            color: #2b3245;
        }
        .MyMainTable {
            padding: 10px 0px;
            border-bottom: 1px solid #eef1f6;
            .el-col {
                text-align: center;
            }
            .el-icon-plus:before {
                color: #337aba;
                font-size: 20px;
                font-weight: 800;
                cursor: pointer;
            }
            .el-icon-minus:before {
                color: #e51c23;
                font-size: 20px;
                font-weight: 800;
                cursor: pointer;
            }
            .el-form-item--mini.el-form-item {
                margin-bottom: 1px !important;
            }
            .el-form-item--mini .el-form-item__content {
                margin-left: 0px !important;
            }
            .el-input--mini .el-input__inner {
                width: 100%;
            }
        }
    }
}
</style>

<template>
    <div id="cmain" class="family-tree-mask" v-loading="loading" element-loading-text="数据加载中，请稍等......">
        <div class="mainContent">

            <el-form ref="datas" :model="datas" size="mini" label-width="200px" label-position="left">
                <!--临床与治疗信息  -->
                <div class="table-title">临床与治疗信息</div>
                <el-row type="flex" justify="space-around">
                    <el-col :span="12" :offset="3">
                        <el-form-item label="组织病理类型">
                            <el-select v-model="datas.pathology_type" placeholder="请选择病理类型">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="原位癌" value="1"></el-option>
                                <el-option label="侵袭性癌" value="2"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="" v-if='datas.pathology_type==1'>
                            <el-select v-model="datas.cis">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="导管原位癌" value="1"></el-option>
                                <el-option label="小叶原位癌" value="2"></el-option>
                                <el-option label="导管内佩吉特病" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="" v-if='datas.pathology_type==2'>
                            <el-select v-model="datas.invasive_carinoma">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="浸润性导管癌" value="1"></el-option>
                                <el-option label="炎性乳腺癌" value="2"></el-option>
                                <el-option label="淋巴样髓质乳腺癌" value="3"></el-option>
                                <el-option label="粘液癌" value="4"></el-option>
                                <el-option label="乳头状癌" value="5"></el-option>
                                <el-option label="管状癌" value="6"></el-option>
                                <el-option label="浸润性小叶癌" value="7"></el-option>
                                <el-option label="浸润性佩吉特病" value="8"></el-option>
                                <el-option label="未分化癌" value="9"></el-option>
                                <el-option label="鳞状细胞癌" value="10"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="分子分型">
                            <el-select v-model="datas.molecular_subtyping">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="Luminal A样" value="1"></el-option>
                                <el-option label="Luminal B样（HER2阴性）" value="2"></el-option>
                                <el-option label="Luminal B样（HER2阳性）" value="3"></el-option>
                                <el-option label="HER-2阳性 (非Luminal)" value="4"></el-option>
                                <el-option label="三阴性乳腺癌" value="5"></el-option>
                                <el-option label="内分泌反应型" value="6"></el-option>
                                <el-option label="内分泌无反应型" value="7"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="" v-if='datas.molecular_subtyping==6'>
                            <el-select v-model="datas.endocrine_response">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="筛状癌" value="1"></el-option>
                                <el-option label="小管癌" value="2"></el-option>
                                <el-option label="粘液腺癌" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="" v-if='datas.molecular_subtyping==7'>
                            <el-select v-model="datas.endocrine_unresponsive">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="顶浆分泌" value="1"></el-option>
                                <el-option label="髓样癌" value="2"></el-option>
                                <el-option label="腺样囊性癌" value="3"></el-option>
                                <el-option label="生化性癌" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="临床分期cTNM"></el-form-item>
                        <el-form-item label="T">
                            <el-select v-model="datas.t" @change='tnm()'>
                                <el-option label="请选择" value=""></el-option>
                                <el-option v-for="(item,index) in t_data" :label="item" :value="item" :key="index"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="N">
                            <el-select v-model="datas.n" @change='tnm()'>
                                <el-option label="请选择" value=""></el-option>
                                <el-option v-for="(item,index) in n_data" :label="item" :value="item" :key="index"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="M">
                            <el-select v-model="datas.m" @change='tnm()'>
                                <el-option label="请选择" value=""></el-option>
                                <el-option v-for="(item,index) in m_data" :label="item" :value="item" :key="index"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="临床分期结果">
                            <div style="height40px;line-height40px;">{{datas.tnm_result}}</div>
                        </el-form-item>
                        <el-form-item label="病理分期pTNM"></el-form-item>
                        <el-form-item label="T">
                            <el-select v-model="datas.pt" @change='ptnm()'>
                                <el-option label="请选择" value=""></el-option>
                                <el-option v-for="(item,index) in t_data" :label="item" :value="item" :key="index"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="N">
                            <el-select v-model="datas.pn" @change='ptnm()'>
                                <el-option label="请选择" value=""></el-option>
                                <el-option v-for="(item,index) in p_data" :label="item" :value="item" :key="index"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="M">
                            <el-select v-model="datas.pm" @change='ptnm()'>
                                <el-option label="请选择" value=""></el-option>
                                <el-option v-for="(item,index) in m_data" :label="item" :value="item" :key="index"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="病理分期结果">
                            <div style="height40px;line-height40px;">{{datas.ptnm_result}}</div>
                        </el-form-item>
                        <el-form-item label="致密型乳房">
                            <el-radio-group v-model="datas.compact_breast">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="乳房活检">
                            <el-radio-group v-model="datas.breast_biopsy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="活检次数" v-if="datas.breast_biopsy==1">
                            <el-input v-model="datas.breast_biopsy_number"></el-input>
                        </el-form-item>
                        <el-form-item label="检测到非典型性增生次数" v-if="datas.breast_biopsy==1">
                            <el-radio-group v-model="datas.hyperplsie_typique">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="次数" v-if="datas.hyperplsie_typique==1">
                            <el-input v-model="datas.hyperplsie_typique_number"></el-input>
                        </el-form-item>
                        <el-form-item label="单侧多灶性">
                            <el-radio-group v-model="datas.umbc">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="双侧患癌">
                            <el-radio-group v-model="datas.bilateral_cancer">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="双侧患癌年龄" v-if="datas.bilateral_cancer==1">
                            <el-input v-model="datas.opposite_cancer_age"></el-input>
                        </el-form-item>
                        <el-form-item label="接受过双侧卵巢切除术">
                            <el-radio-group v-model="datas.bilateral_oophorectomy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="手术年龄" v-if="datas.bilateral_oophorectomy==1">
                            <el-input v-model="datas.boa"></el-input>
                        </el-form-item>
                        <el-form-item label="是否进行过铂类化疗">
                            <el-radio-group v-model="datas.platinum_chemotherapy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="化疗次数" v-if="datas.platinum_chemotherapy==1">
                            <el-input v-model="datas.pcn"></el-input>
                        </el-form-item>
                        <el-form-item label="是否对铂类敏感">
                            <el-radio-group v-model="datas.is_sensitive_platinum">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="PARP抑制剂治疗">
                            <el-select v-model="datas.parp">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="奥拉帕利" value="1"></el-option>
                                <el-option label="尼拉帕尼" value="2"></el-option>
                                <el-option label="雷卡帕尼" value="3"></el-option>
                                <el-option label="其他" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="具体信息" v-if="datas.parp==4">
                            <el-input v-model="datas.parp_detail"></el-input>
                        </el-form-item>

                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="是否绝经">
                            <el-radio-group v-model="datas.menopause">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="绝经年龄" v-if="datas.menopause==1">
                            <el-select v-model="datas.menopause_age">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜55岁" value="2"></el-option>
                                <el-option label="≥55岁" value="1"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="初次月经年龄">
                            <el-select v-model="datas.primary_age">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜12岁" value="1"></el-option>
                                <el-option label="≥12岁" value="2"></el-option>
                            </el-select>
                        </el-form-item>

                        <el-form-item label="生育情况">
                            <el-select v-model="datas.fertility_circumstance">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="已生育" value="1"></el-option>
                                <el-option label="未生育" value="2"></el-option>
                                <el-option label="不孕不育" value="3"></el-option>
                                <el-option label="选择不生育" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="初次生育年龄" v-if="datas.fertility_circumstance==1">
                            <el-select v-model="datas.first_childbearing_age">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜25岁" value="1"></el-option>
                                <el-option label="25-30岁" value="2"></el-option>
                                <el-option label="≥30岁" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="子女个数" v-if="datas.fertility_circumstance==1">
                            <el-select v-model="datas.children_number">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="1个" value="1"></el-option>
                                <el-option label="2个" value="2"></el-option>
                                <el-option label="3个" value="3"></el-option>
                                <el-option label="＞3个" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="是否母乳喂养">
                            <el-radio-group v-model="datas.breast_feeding" v-if="datas.fertility_circumstance==1">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="哺乳时间" v-if="datas.breast_feeding==1">
                            <el-select v-model="datas.nursing_time">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜半年" value="1"></el-option>
                                <el-option label="＜1年" value="2"></el-option>
                                <el-option label="≥1年" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="服用口服避孕药">
                            <el-radio-group v-model="datas.oral_contraceptive">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="连续服用时间" v-if="datas.oral_contraceptive==1">
                            <el-select v-model="datas.oral_contraceptive_time">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜6个月" value="1"></el-option>
                                <el-option label="＞6个月" value="2"></el-option>
                                <el-option label="3-5年" value="3"></el-option>
                                <el-option label="＞5年" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="手术">
                            <el-select v-model="datas.operative_type">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="改良根治术" value="1"></el-option>
                                <el-option label="根治术" value="2"></el-option>
                                <el-option label="保乳手术" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="是否进行过免疫治疗">
                            <el-radio-group v-model="datas.immunological_therapy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="药物名称" v-if="datas.immunological_therapy==1">
                            <el-input v-model="datas.it_drug_name"></el-input>
                        </el-form-item>
                        <el-form-item label="内分泌治疗">
                            <el-radio-group v-model="datas.endocrinotherapy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="放疗">
                            <el-radio-group v-model="datas.radiotherapy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="胸壁放射治疗">
                            <el-radio-group v-model="datas.chest_radiotherapy">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="他莫昔芬治疗">
                            <el-radio-group v-model="datas.tamoxifen_treatment">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="激素替代治疗（联合雌激素和孕酮）">
                            <el-radio-group v-model="datas.hrt">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="激素替代治疗（孕激素）">
                            <el-radio-group v-model="datas.hrt_lutin">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="其他治疗">
                            <el-radio-group v-model="datas.other_treatment">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="具体信息" v-if="datas.other_treatment==1">
                            <el-input v-model="datas.other_treatment_name"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!-- 遗传性肿瘤综合征表型信息 -->
                <div class="table-title">遗传性肿瘤综合征表型信息</div>
                <el-row type="flex" justify="space-around">
                    <el-col :span="12" :offset="3">
                        <el-form-item label="自闭症谱系障碍">
                            <el-radio-group v-model="datas.asd">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="智力损伤（IQ≤75）">
                            <el-radio-group v-model="datas.intellectual_damage">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="脊柱侧弯">
                            <el-radio-group v-model="datas.scoliosis">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="多发性腋窝或肱股沟雀斑样色素沉着">
                            <el-radio-group v-model="datas.freckle_pigmentation">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="成人 Lhermitte– Duclos病史">
                            <el-radio-group v-model="datas.lhermitte_duclos">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="黑斑性息肉病家族史">
                            <el-radio-group v-model="datas.blackspot_family_history">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="患有黑斑性息肉">
                            <el-radio-group v-model="datas.blackspot_polyp">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.blackspot_polyp==1">
                            <el-input v-model="datas.blackspot_number"></el-input>
                        </el-form-item>
                        <el-form-item label="食道糖原棘皮症">
                            <el-radio-group v-model="datas.glycogen_spines">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.glycogen_spines==1">
                            <el-input v-model="datas.glycogen_spines_num"></el-input>
                        </el-form-item>
                        <el-form-item label="患有神经纤维瘤">
                            <el-radio-group v-model="datas.neurofibroma">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.neurofibroma==1">
                            <el-input v-model="datas.neurofibroma_num"></el-input>
                        </el-form-item>
                        <el-form-item label="患有丛状神经纤维瘤">
                            <el-radio-group v-model="datas.plexiform_neurofibromas">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.plexiform_neurofibromas==1">
                            <el-input v-model="datas.pnn"></el-input>
                        </el-form-item>
                        <el-form-item label="皮肤黏膜病变">
                            <el-row type="flex" align="middle">
                                <el-col :span="8">
                                    <el-checkbox v-model="datas.trichilemoma">毛鞘瘤</el-checkbox>
                                </el-col>
                                <el-col :span="12">
                                    <el-radio-group v-if="datas.trichilemoma==true" v-model="datas.trichilemoma_num">
                                        <el-radio label="1">＜3个</el-radio>
                                        <el-radio label="2">≥3个</el-radio>
                                    </el-radio-group>
                                </el-col>
                            </el-row>
                            <el-row type="flex" align="middle">
                                <el-col :span="8">
                                    <el-checkbox v-model="datas.acrokeratoderma">肢端角化</el-checkbox>
                                </el-col>
                                <el-col :span="12">
                                    <el-radio-group v-if="datas.acrokeratoderma==true" v-model="datas.acrokeratoderma_num">
                                        <el-radio label="1">＜3个</el-radio>
                                        <el-radio label="2">≥3个</el-radio>
                                    </el-radio-group>
                                </el-col>
                            </el-row>
                            <el-row type="flex" align="middle">
                                <el-col :span="8">
                                    <el-checkbox v-model="datas.mucocutaneous_lesion">皮肤黏膜神经瘤</el-checkbox>
                                </el-col>
                                <el-col :span="12">
                                    <el-radio-group v-if="datas.mucocutaneous_lesion==true" v-model="datas.mnn">
                                        <el-radio label="1">＜3个</el-radio>
                                        <el-radio label="2">≥3个</el-radio>
                                    </el-radio-group>
                                </el-col>
                            </el-row>
                            <el-row type="flex" align="middle">
                                <el-col :span="8">
                                    <el-checkbox v-model="datas.oral_papilloma">口腔乳头瘤</el-checkbox>
                                </el-col>
                                <el-col :span="12">
                                    <el-radio-group v-if="datas.oral_papilloma==true" v-model="datas.oral_papilloma_num">
                                        <el-radio label="1">＜3个</el-radio>
                                        <el-radio label="2">≥3个</el-radio>
                                    </el-radio-group>
                                </el-col>
                            </el-row>
                        </el-form-item>
                    </el-col>

                    <el-col :span="12">
                        <el-form-item label="儿童时期确诊为小脑共济失调">
                            <el-radio-group v-model="datas.cerebellar_ataxia">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="儿童时期确诊为Bloom综合征">
                            <el-radio-group v-model="datas.bloom">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="多发性甲状腺结节">
                            <el-radio-group v-model="datas.multiple_nodi_goitre">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="蝶骨、胫骨发育不良">
                            <el-radio-group v-model="datas.dysontogenesis">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="血管异常（包括多发颅内静脉发育异常）">
                            <el-radio-group v-model="datas.vascular_anomaly">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="皮肤黏膜色素沉着过度">
                            <el-radio-group v-model="datas.hyperpigmentation">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="胃肠道错构瘤／神经节瘤">
                            <el-radio-group v-model="datas.hamartoma">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.hamartoma==1">
                            <el-input v-model="datas.hamartoma_num"></el-input>
                        </el-form-item>
                        <el-form-item label="患有咖啡斑">
                            <el-radio-group v-model="datas.coffee_spot">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.coffee_spot==1">
                            <el-input v-model="datas.coffee_spot_num"></el-input>
                        </el-form-item>
                        <el-form-item label="患有Lisch结节">
                            <el-radio-group v-model="datas.lish">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.lish==1">
                            <el-input v-model="datas.lish_number"></el-input>
                        </el-form-item>
                        <el-form-item label="患有脂肪瘤">
                            <el-radio-group v-model="datas.lipomyoma">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="个数" v-if="datas.lipomyoma==1">
                            <el-input v-model="datas.lipomyoma_number"></el-input>
                        </el-form-item>
                        <el-form-item label="大头畸形（头围）">
                            <el-select v-model="datas.macrocephalia">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="＜58cm" value="1"></el-option>
                                <el-option label="58cm-60cm" value="2"></el-option>
                                <el-option label="＞60cm" value="3"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="生殖器异常">
                            <el-checkbox-group v-model="datas.genital_anomaly">
                                <el-checkbox label="1">阴茎斑点状色素沉着</el-checkbox>
                                <el-checkbox label="2">睾丸脂肪增多</el-checkbox>
                            </el-checkbox-group>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!-- 基因检测信息 -->
                <div class="table-title">基因检测信息</div>
                <div id="my-table-title">
                    <el-row display="flex" align="middle" justify="space-between">
                        <el-col span="3">操作</el-col>
                        <el-col span="4">基因</el-col>
                        <el-col span="4">转录本号</el-col>
                        <el-col span="4">变异位点</el-col>
                        <el-col span="3">检测类型</el-col>
                        <el-col span="3">功能改变</el-col>
                        <el-col span="3">突变类型</el-col>
                    </el-row>
                </div>

                <div class="MyMainTable" v-for="(item,index) in datas.results" :key="item.id">
                    <el-row>
                        <el-col span="3">
                            <i class="el-icon-plus" @click="addGenejcInfo(index)"></i>
                            <i class="el-icon-minus" @click="deleteGenejcInfo(index)"></i>
                        </el-col>
                        <el-col span="4">
                            <el-form-item>
                                <el-input v-model="item.detection_result_gene" placeholder="只能输入大写字母和数字"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col span="4">
                            <el-form-item label-width="0">
                                <el-input v-model="item.detection_result_trans" placeholder="请输入转录本号"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col span="4">
                            <el-form-item label-width="0">
                                <el-input v-model="item.detection_result_varia" placeholder="请输入变异位点"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col span="3">
                            <el-form-item label-width="0">
                                <el-select v-model="item.assay_type">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option label="全基因组" value="1"></el-option>
                                    <el-option label="全外显子检测" value="2"></el-option>
                                    <el-option label="panel检测" value="3"></el-option>
                                    <el-option label="sanger测序" value="4"></el-option>
                                    <el-option label="MLPA" value="5"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col span="3">
                            <el-form-item label-width="0">
                                <el-select v-model="item.functional_change" v-show="item.functional_change != 6">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option label="错义突变" value="1"></el-option>
                                    <el-option label="无义突变" value="2"></el-option>
                                    <el-option label="移码突变" value="3"></el-option>
                                    <el-option label="同义突变" value="4"></el-option>
                                    <el-option label="剪接位点突变" value="5"></el-option>
                                    <el-option label="其他" value="6"></el-option>
                                </el-select>
                            </el-form-item>
                            <el-form-item v-if="item.functional_change==6" label-width="0">
                                <el-input v-model="item.other_function_change"></el-input>
                                <i class="el-icon-error" @click="shouFunctionalChange(index)"></i>
                            </el-form-item>
                        </el-col>
                        <el-col span="3">
                            <el-form-item label-width="0">
                                <el-select v-model="item.mutation_type">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option label="致病的" value="1"></el-option>
                                    <el-option label="可能致病的" value="2"></el-option>
                                    <el-option label="意义不明确的" value="3"></el-option>
                                    <el-option label="可能良性的" value="4"></el-option>
                                    <el-option label="良性的" value="5"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </div>

                <!-- 生活方式 -->
                <div class="table-title">生活方式</div>
                <el-row type="flex" justify="space-around">
                    <el-col :span="12" :offset="3">
                        <el-form-item label="吸烟">
                            <el-radio-group v-model="datas.smoking">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="吸烟频率" v-if="datas.smoking==1">
                            <el-row type="flex">
                                <el-col span="6">
                                    <el-input v-model="datas.smoking_cycle" style="width:50px;" class="smok-drink">
                                        <!-- <template slot="append"></template> -->
                                    </el-input>
                                    包/周&nbsp;&nbsp;X
                                </el-col>
                                <el-col span="12">
                                    <el-input v-model="datas.smoking_year" style="width:50px;" class="smok-drink">
                                        <!-- <template slot="append">年</template> -->
                                    </el-input>
                                    年
                                </el-col>
                            </el-row>
                        </el-form-item>
                        <el-form-item label="饮酒">
                            <el-radio-group v-model="datas.drink">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="饮酒频率" v-if="datas.drink==1">
                            <el-row type="flex">
                                <el-col span="12">
                                    <el-input v-model="datas.drink_cycle" style="width:50px;" class="smok-drink">
                                        <!-- <template slot="append">次/周</template> -->
                                    </el-input>
                                    次/周
                                </el-col>
                            </el-row>
                        </el-form-item>
                        <el-form-item label="高脂高红肉类饮食">
                            <el-radio-group v-model="datas.fatty_meat">
                                <el-radio label="1">是</el-radio>
                                <el-radio label="2">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="每日蔬菜摄入量">
                            <el-select v-model="datas.vegetable_consum">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="≥500mg" value="1"></el-option>
                                <el-option label="＜500mg" value="2"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="每日运动消耗量">
                            <el-select v-model="datas.dec">
                                <el-option label="请选择" value=""></el-option>
                                <el-option label="基本无运动量" value="1"></el-option>
                                <el-option label="30-50大卡" value="2"></el-option>
                                <el-option label="50-100大卡" value="3"></el-option>
                                <el-option label="100-200大卡" value="4"></el-option>
                                <el-option label="200-300大卡" value="5"></el-option>
                                <el-option label="＞300大卡" value="6"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="体重(kg)">
                            <el-input v-model="datas.weight" @change="getBmi"></el-input>
                        </el-form-item>
                        <el-form-item label="身高(cm)">
                            <el-input v-model="datas.height" @change="getBmi"></el-input>
                        </el-form-item>
                        <el-form-item label="BMI">
                            <div>{{ datas.bmi }}</div>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-card class="box-card footer-card">
                    <div slot="header" class="clearfix">
                        <Button style="float: right; margin-left:20px;" @click="onClose">取消</Button>
                        <Button type="primary" style="float: right;" @click="onSave">保存</Button>
                    </div>
                </el-card>

            </el-form>
        </div>
    </div>
</template>
<script>
import { getCookie } from "common/js/cookie.js";
import { familyTree } from "api/basic/familyTree/familyTree.js";
export default {
    name: "rxa", //乳腺癌
    data() {
        return {
            t_data: [
                "TX",
                "T0",
                "Tis",
                "T1",
                "T1mi",
                "T1a",
                "T1b",
                "T1c",
                "T2",
                "T3",
                "T4",
                "T4a",
                "T4b",
                "T4c",
                "T4d"
            ],
            n_data: [
                "NX",
                "N0",
                "N1",
                "N1mi",
                "N2",
                "N2a",
                "N2b",
                "N3",
                "N3a",
                "N3b",
                "N3c"
            ],
            m_data: ["M0", "M1"],
            p_data: [
                "pNX",
                "pN0",
                "pN0(i-)",
                "pN0(i+)",
                "pN0(mol-)",
                "pN0(mol+)",
                "pN1",
                "pN1mi",
                "pN1a",
                "pN1b",
                "pN1c",
                "pN2",
                "pN2a",
                "pN2b",
                "pN3",
                "pN3a",
                "pN3b",
                "pN3c"
            ],

            datas: {
                pathology_type: "", //组织病理类型
                cis: "",
                invasive_carinoma: "",
                molecular_subtyping: "", //分子分型
                endocrine_response: "",
                endocrine_unresponsive: "",
                t: "",
                n: "",
                m: "",
                tnm_result: "",
                pt: "",
                pn: "",
                pm: "",
                ptnm_result: "",
                compact_breast: "2", //致密型乳房
                breast_biopsy: "2", //乳房活检
                breast_biopsy_number: "", //乳房活检次数
                hyperplsie_typique: "2", //非典型增生
                hyperplsie_typique_number: "", //非典型增生次数
                umbc: "2", //单侧多灶性
                bilateral_cancer: "2", //双侧患癌
                opposite_cancer_age: "", //双侧患癌年龄
                bilateral_oophorectomy: "2", //双侧卵巢切除术
                boa: "", //双侧卵巢切除术年龄
                platinum_chemotherapy: "2", //铂类化疗
                pcn: "", //铂类化疗次数
                is_sensitive_platinum: "2", //铂类化疗敏感
                parp: "", //PARP抑制剂治疗
                parp_detail: "", //PARP抑制剂治疗具体信息
                menopause: "2", //是否绝经
                menopause_age: "", //绝经年龄
                primary_age: "", //初次月经年龄
                fertility_circumstance: "", //生育情况
                first_childbearing_age: "", //初次生育年龄
                children_number: "", //子女个数
                breast_feeding: "2", //是否母乳
                nursing_time: "", //哺乳时间
                oral_contraceptive: "2", //口服避孕药
                oral_contraceptive_time: "", //服用时间
                operative_type: "", //手术
                immunological_therapy: "2", //免疫治疗
                it_drug_name: "", //免疫治疗具体信息
                endocrinotherapy: "2", //内分泌治疗
                radiotherapy: "2", //放疗
                chest_radiotherapy: "2", //胸壁放射治疗
                tamoxifen_treatment: "2", //他莫西芬治疗
                hrt: "2", //激素替代治疗（联合雌激素和孕酮）
                hrt_lutin: "2", //激素替代治疗（孕激素）
                other_treatment: "2", //其他治疗
                other_treatment_name: "", //其他治疗信息
                asd: "2", //自闭症谱系障碍
                intellectual_damage: "2", //智力损伤
                scoliosis: "2", //脊柱侧弯
                freckle_pigmentation: "2", //多发性腋窝或肱股沟雀斑样色素沉着
                lhermitte_duclos: "2", //成人 Lhermitte– Duclos病史
                blackspot_polyp: "2", //患有黑斑性息肉个数
                blackspot_number: "", //患有黑斑性息肉
                blackspot_family_history: "2", //黑斑性息肉病家族史
                glycogen_spines: "2", //食道糖原棘皮症
                glycogen_spines_num: "", //食道糖原棘皮症个数
                neurofibroma: "2", //患有神经纤维瘤
                neurofibroma_num: "", //患有神经纤维瘤个数
                plexiform_neurofibromas: "2", //患有丛状神经纤维瘤
                pnn: "", //患有丛状神经纤维瘤个数
                trichilemoma: "2", //毛鞘瘤
                trichilemoma_num: "",
                acrokeratoderma: "", //肢端角化
                acrokeratoderma_num: "",
                mucocutaneous_lesion: "2", //皮肤黏膜神经瘤
                mnn: "",
                oral_papilloma: "2", //口腔乳头瘤
                oral_papilloma_num: "",
                cerebellar_ataxia: "2", //儿童时期确诊为小脑共济失调
                bloom: "2", //儿童时期确诊为Bloom综合征
                multiple_nodi_goitre: "2", //多发性甲状腺结节
                dysontogenesis: "2", //蝶骨、胫骨发育不良
                vascular_anomaly: "2", //血管异常（包括多发颅内静脉发育异常）
                hyperpigmentation: "2", //皮肤黏膜色素沉着过度
                hamartoma: "2", //胃肠道错构瘤／神经节瘤
                hamartoma_num: "",
                coffee_spot: "2", //患有咖啡斑
                coffee_spot_num: "",
                lish: "2", //患有Lisch结节
                lish_number: "",
                macrocephalia: "", //大头畸形（头围）
                lipomyoma: "2", //患有脂肪瘤
                lipomyoma_number: "",
                genital_anomaly: [], //生殖器异常
                results: [
                    {
                        assay_type: "",
                        detection_result_gene: "",
                        detection_result_trans: "",
                        detection_result_varia: "",
                        functional_change: "",
                        other_function_change: "",
                        mutation_type: ""
                    }
                ],
                smoking: "2",
                drink: "2",
                vegetable_consum: "",
                fatty_meat: "2",
                dec: "",
                drink_cycle: "",
                bmi: "",
                height: "",
                weight: "",
                smoking_cycle: "",
                smoking_year: ""
            },
            loading: true,
            postParams: {}
        };
    },
    components: {},
    created() {},
    watch: {
        datas: {
            //不当选，清空相关联值
            handler: function(newVal) {
                // 组织病理
                if (newVal.pathology_type != 1) {
                    this.datas.cis = "";
                } else if (newVal.pathology_type != 2) {
                    this.datas.invasive_carinoma = "";
                }
                // 分子分型
                if (newVal.molecular_subtyping != 6) {
                    this.datas.endocrine_response = "";
                } else if (newVal.molecular_subtyping != 7) {
                    this.datas.endocrine_unresponsive = "";
                }
                // 乳房活检
                if (newVal.breast_biopsy != 1) {
                    this.datas.breast_biopsy_number = "";
                }
                // 检测到非典型性增生次数
                if (newVal.hyperplsie_typique != 1) {
                    this.datas.hyperplsie_typique_number = "";
                }
                // 双侧患癌年龄
                if (newVal.bilateral_cancer != 1) {
                    this.datas.opposite_cancer_age = "";
                }
                // 双侧卵巢切除术年龄
                if (newVal.bilateral_oophorectomy != 1) {
                    this.datas.boa = "";
                }
                // 铂类化疗
                if (newVal.platinum_chemotherapy != 1) {
                    this.datas.pcn = "";
                }
                // PARP抑制剂治疗
                if (newVal.parp != 4) {
                    this.datas.parp_detail = "";
                }
                // 绝经年龄清空
                if (newVal.menopause != 1) {
                    this.datas.menopause_age = "";
                }
                // 生育年龄与子女个数清空
                if (newVal.fertility_circumstance != 1) {
                    this.datas.first_childbearing_age = "";
                    this.datas.children_number = "";
                    this.datas.breast_feeding = "";
                    this.datas.nursing_time = "";
                }
                // 哺乳时间清空
                if (newVal.breast_feeding != 1) {
                    this.datas.nursing_time = "";
                }
                // 服用避孕药时间清空
                if (newVal.oral_contraceptive != 1) {
                    this.datas.oral_contraceptive_time = "";
                }
                // 免疫治疗
                if (newVal.immunological_therapy != 1) {
                    this.datas.it_drug_name = "";
                }
                // 其他治疗
                if (newVal.other_treatment != 1) {
                    this.datas.other_treatment_name = "";
                }
                // 患有黑斑性息肉
                if (newVal.blackspot_polyp != 1) {
                    this.datas.blackspot_number = "";
                }
                // 食道糖原棘皮症个数
                if (newVal.glycogen_spines != 1) {
                    this.datas.glycogen_spines_num = "";
                }
                // 患有神经纤维瘤
                if (newVal.neurofibroma != 1) {
                    this.datas.neurofibroma_num = "";
                }
                // 患有丛状神经纤维瘤
                if (newVal.plexiform_neurofibromas != 1) {
                    this.datas.pnn = "";
                }
                //皮肤黏膜病变
                // 毛鞘瘤
                if (newVal.trichilemoma != true) {
                    this.datas.trichilemoma_num = "";
                }
                // 肢端角化
                if (newVal.acrokeratoderma != true) {
                    this.datas.acrokeratoderma_num = "";
                }
                // 皮肤黏膜神经瘤
                if (newVal.mucocutaneous_lesion != true) {
                    this.datas.mnn = "";
                }
                // 口腔乳头瘤
                if (newVal.oral_papilloma != true) {
                    this.datas.oral_papilloma_num = "";
                }
                // 胃肠道错构瘤／神经节瘤
                if (newVal.hamartoma != 1) {
                    this.datas.hamartoma_num = "";
                }
                // 患有咖啡斑
                if (newVal.coffee_spot != 1) {
                    this.datas.coffee_spot_num = "";
                }
                // 患有Lisch结节
                if (newVal.lish != 1) {
                    this.datas.lish_number = "";
                }
                // 患有脂肪瘤
                if (newVal.lipomyoma != 1) {
                    this.datas.lipomyoma_number = "";
                }
                // 吸烟
                if (newVal.smoking != 1) {
                    this.datas.smoking_cycle = "";
                    this.datas.smoking_year = "";
                }
                // 饮酒
                if (newVal.drink != 1) {
                    this.datas.cut_tuboovarian_age = "";
                }
            },
            deep: true
        }
    },
    mounted() {
        document.title = "乳腺癌辅助信息";
        //获取辅助信息
        this.postParams.userId = getCookie("userid");
        this.postParams.familyTreeId = M.url().familyTreeId;
        this.postParams.familyUserId = M.url().current_personid;
        this.postParams.cancerId = M.url().cancerId;
        console.log(this.postParams);
        this.loading = true;
        familyTree
            .findOneFromCancer(this.postParams)
            .then(res => {
                if (res.returnCode == 0) {
                    if (res.data && res.data.familyCancer) {
                        this.datas = { ...res.data.familyCancer };
                        this.$Message.success("数据加载成功");
                    }
                } else {
                    this.$Message.error("数据加载失败");
                }
                this.loading = false;
            })
            .catch(error => {
                this.loading = false;
            });
    },
    methods: {
        onClose() {
            window.close();
        },
        onSave() {
            this.loading = true;
            this.postParams.familyCancer = this.datas;
            familyTree
                .saveOrUpdateCancerForm(this.postParams)
                .then(res => {
                    if (res.returnCode == 0) {
                        this.$Message.success("数据保存成功");
                    } else {
                        this.$Message.error("数据保存失败");
                    }
                    this.loading = false;
                })
                .catch(err => {
                    this.loading = false;
                });
        },
        tnm() {
            //
            this.ShowState(this.datas.t, this.datas.n, this.datas.m, 1);
        },
        ptnm() {
            this.ShowState(this.datas.pt, this.datas.pn, this.datas.pm, 2);
        },

        ShowState(t, n, m, that) {
            let resultNode = "";
            if (t == "" || n == "" || m == "") {
                resultNode = "无分期";

                if (that == 1) {
                    this.datas.tnm_result = resultNode;
                } else {
                    this.datas.ptnm_result = resultNode;
                }
                return;
            }
            if (!t || !n || !m) {
                resultNode = "无分期";
                if (that == 1) {
                    this.datas.tnm_result = resultNode;
                } else {
                    this.datas.ptnm_result = resultNode;
                }
                return;
            } else {
                if (m == "M1") {
                    resultNode = t + n + m + "  IV期";
                } else if (n == "N1mi" || n == "pN1mi") {
                    if (t == "T0" || t == "T1" || t == "T1mi") {
                        resultNode = t + n + m + "  IB期";
                    } else {
                        resultNode = "无分期";
                    }
                } else if (
                    n == "pN3" ||
                    n == "N3" ||
                    n == "N3a" ||
                    n == "N3b" ||
                    n == "N3c" ||
                    n == "pN3a" ||
                    n == "pN3b" ||
                    n == "pN3c"
                ) {
                    resultNode = t + n + m + "  IIIC期";
                } else if (
                    t == "T4" ||
                    t == "T4a" ||
                    t == "T4b" ||
                    t == "T4c" ||
                    t == "T4d"
                ) {
                    if (
                        n == "N0" ||
                        n == "N1" ||
                        n == "N2" ||
                        n == "pN0" ||
                        n == "pN0(i-)" ||
                        n == "pN0(i+)" ||
                        n == "pN0(mol+)" ||
                        n == "pN0(mol-)" ||
                        n == "pN1" ||
                        n == "pN2" ||
                        n == "pN2a" ||
                        n == "pN2b" ||
                        n == "N2a" ||
                        n == "N2b" ||
                        n == "N1mi" ||
                        n == "pN1mi" ||
                        n == "pN1a" ||
                        n == "pN1b" ||
                        n == "pN1c"
                    )
                        resultNode = t + n + m + "  IIIB期";
                } else if (
                    n == "N2" ||
                    n == "pN2" ||
                    n == "N2a" ||
                    n == "pN2a" ||
                    n == "N2b" ||
                    n == "pN2b"
                ) {
                    if (
                        t == "T1" ||
                        t == "T2" ||
                        t == "T3" ||
                        t == "T1mi" ||
                        t == "T0" ||
                        t == "T1a" ||
                        t == "T1b" ||
                        t == "T1c"
                    ) {
                        resultNode = t + n + m + "  IIIA期";
                    }
                } else if (
                    n == "N1" ||
                    n == "pN1" ||
                    n == "pN1a" ||
                    n == "pN1b" ||
                    n == "pN1c"
                ) {
                    if (
                        t == "T0" ||
                        t == "T1" ||
                        t == "T1mi" ||
                        t == "T1a" ||
                        t == "T1b" ||
                        t == "T1c"
                    ) {
                        resultNode = t + n + m + "  IIA期";
                    } else if (t == "T3") {
                        resultNode = t + n + m + "  IIIA期";
                    } else if (t == "T2") {
                        resultNode = t + n + m + "  IIB期";
                    }
                } else if (
                    n == "N0" ||
                    n == "pN0" ||
                    n == "pN0(i-)" ||
                    n == "pN0(i+)" ||
                    n == "pN0(mol+)" ||
                    n == "pN0(mol-)"
                ) {
                    if (
                        t == "T1" ||
                        t == "T1mi" ||
                        t == "T1a" ||
                        t == "T1b" ||
                        t == "T1c"
                    ) {
                        resultNode = t + n + m + "  IA期";
                    } else if (t == "Tis") {
                        resultNode = t + n + m + "  O期";
                    } else if (t == "T2") {
                        resultNode = t + n + m + "  IIA期";
                    } else if (t == "T3") {
                        resultNode = t + n + m + "  IIB期";
                    }
                } else {
                    resultNode = "无分期";
                }
            }
            if (resultNode == null || resultNode == "") {
                resultNode = "无分期";
            }

            if (that == 1) {
                this.datas.tnm_result = resultNode;
            } else {
                this.datas.ptnm_result = resultNode;
            }
        },
        addGenejcInfo(index) {
            let obj = {
                detection_result_gene: "", //基因
                detection_result_trans: "", //转录本号
                detection_result_varia: "", //变异位点
                assay_type: "", //检测类型
                functional_change: "", //功能改变
                other_function_change: "", //其他
                mutation_type: "" //突变类型
            };
            ++index;
            this.datas.results.splice(index, 0, obj);
        },
        deleteGenejcInfo(index) {
            if (this.datas.results.length <= 1) {
                this.$Message.info("最少为一条，不可删除了");
                return;
            }
            this.datas.results.splice(index, 1);
        },
        shouFunctionalChange(index) {
            this.datas.results[index].functional_change = "";
            // 清空输入框
            this.datas.results[index].other_function_change = "";
        },
        getBmi() {
            let bmi =
                Math.round(
                    this.datas.weight /
                        Math.pow(this.datas.height / 100, 2) *
                        100
                ) / 100;
            if (isNaN(bmi) || bmi == Infinity) {
                this.datas.bmi = "";
            } else {
                this.datas.bmi = bmi;
            }
        }
    }
};
</script>
 